/**
 * Handles the class SalesOrder.
 * 
 * Author: Group 3
 * Date: 07-04-2014 Version: 1.0
 */
package modellayer;
import java.util.ArrayList;
public class SalesOrder {
	
	private String date, deliveryStatus, deliveryDate;
	private ArrayList<PartOrder> partOrders;
	private int salesOrderID, invoiceID, customerID;
	private Invoice invoice;
	private Customer customer;

	public SalesOrder(String date, String deliveryStatus, String deliveryDate, int salesOrderID, int invoiceID, int customerID) {
		this.date = date;
		this.deliveryStatus = deliveryStatus;
		this.deliveryDate = deliveryDate;
		this.salesOrderID = salesOrderID;
		this.invoiceID = invoiceID;
		this.customerID = customerID;
		partOrders = new ArrayList<PartOrder>();
	}
	
	
	/**
	 * @return the customerID
	 */
	public int getCustomerID() {
		return customerID;
	}

	/**
	 * @param customerID the customerID to set
	 */
	public void setCustomerID(int customerID) {
		this.customerID = customerID;
	}

	/**
	 * @return the customer
	 */
	public Customer getCustomer() {
		return customer;
	}

	/**
	 * @param customer the customer to set
	 */
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public int getInvoiceID() {
		return invoiceID;
	}

	public void setInvoiceID(int invoiceID) {
		this.invoiceID = invoiceID;
	}

	/**
	 * @return the invoice
	 */
	public Invoice getInvoice() {
		return invoice;
	}

	/**
	 * @param invoice the invoice to set
	 */
	public void setInvoice(Invoice invoice) {
		this.invoice = invoice;
	}

	public SalesOrder()
	{
		this.partOrders = new ArrayList<PartOrder>();
	}

	public void setSalesOrderID(int salesOrderID)
	{
		this.salesOrderID = salesOrderID;
	}
	
	public int getSalesOrderID()
	{
		return salesOrderID;
	}
	
	public void addPartOrder(PartOrder partOrder)
	{
		partOrders.add(partOrder);
	}
	
	/**
	 * @return arraylist af partOrders
	 */
	public ArrayList<PartOrder> getPartOrders()
	{
		return partOrders;
	}
	
	/**
	 * 
	 * @param date
	 */
	public void setDate(String date)
	{
		this.date = date;
	}
	
	/**
	 * 
	 * @param deliveryStatus
	 */
	public void setDeliveryStatus(String deliveryStatus)
	{
		this.deliveryStatus = deliveryStatus;
	}
	
	/**
	 * 
	 * @param deliveryDate
	 */
	public void setDeliveryDate(String deliveryDate)
	{
		this.deliveryDate = deliveryDate;
	}
	
	/**
	 * 
	 * @return
	 */
	public String getDate()
	{
		return date;
	}
	
	/**
	 * 
	 * @return
	 */
	public String getDeliveryStatus()
	{
		return deliveryStatus;
	}
	
	/**
	 * 
	 * @return
	 */
	public String getDeliveryDate()
	{
		return deliveryDate;
	}
}
